﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;

public class LoginData
{
    public class client
    {
        public string ip;
        public List<int> valueList;
        public void WriteToBinary(BinaryWriter binary)
        {
            BinaryHandle.WriteString(binary, ip);
            BinaryHandle.Write7BitEncodedInt(binary, valueList.Count);
            foreach (int v1 in valueList)
            {
                BinaryHandle.WriteInt(binary, v1);
            }
        }
        public void ReadByBinary(BinaryReader binary)
        {
            ip = BinaryHandle.ReadString(binary);
            if (valueList == null)
                valueList = new List<int>();
            else
                valueList.Clear();
            int tmp_local_0 = BinaryHandle.Read7BitEncodedInt(binary);
            for (int tmp_local_1 = 0; tmp_local_1 < tmp_local_0; ++tmp_local_1)
            {
                int tmp_local_2;
                tmp_local_2 = BinaryHandle.ReadInt(binary);
                valueList.Add(tmp_local_2);
            }
        }
    }
    public client c;
    public List<List<List<int>>> ssints;
    public Dictionary<client,string> clientmap;
    public uint unit1;
    public sbyte char1;
    public byte uchar1;
    public short short1;
    public ushort ushort1;
    public void WriteToBinary(BinaryWriter binary)
    {
        c.WriteToBinary(binary);
        BinaryHandle.Write7BitEncodedInt(binary, ssints.Count);
        foreach (List<List<int>> v0 in ssints)
        {
            BinaryHandle.Write7BitEncodedInt(binary, v0.Count);
            foreach (List<int> v1 in v0)
            {
                BinaryHandle.Write7BitEncodedInt(binary, v1.Count);
                foreach (int v2 in v1)
                {
                    BinaryHandle.WriteInt(binary, v2);
                }
            }
        }
        BinaryHandle.Write7BitEncodedInt(binary, clientmap.Count);
        foreach (KeyValuePair<client,string> itor0 in clientmap)
        {
            itor0.Key.WriteToBinary(binary);
            BinaryHandle.WriteString(binary, itor0.Value);
        }
        BinaryHandle.WriteUInt(binary, unit1);
        BinaryHandle.WriteByte(binary, char1);
        BinaryHandle.WriteUByte(binary, uchar1);
        BinaryHandle.WriteShort(binary, short1);
        BinaryHandle.WriteUShort(binary, ushort1);
    }
    public void ReadByBinary(BinaryReader binary)
    {
        c.ReadByBinary(binary);
        if (ssints == null)
            ssints = new List<List<List<int>>>();
        else
            ssints.Clear();
        int tmp_local_3 = BinaryHandle.Read7BitEncodedInt(binary);
        for (int tmp_local_4 = 0; tmp_local_4 < tmp_local_3; ++tmp_local_4)
        {
            List<List<int>> tmp_local_5 = new List<List<int>>();
            int tmp_local_6 = BinaryHandle.Read7BitEncodedInt(binary);
            for (int tmp_local_7 = 0; tmp_local_7 < tmp_local_6; ++tmp_local_7)
            {
                List<int> tmp_local_8 = new List<int>();
                int tmp_local_9 = BinaryHandle.Read7BitEncodedInt(binary);
                for (int tmp_local_10 = 0; tmp_local_10 < tmp_local_9; ++tmp_local_10)
                {
                    int tmp_local_11;
                    tmp_local_11 = BinaryHandle.ReadInt(binary);
                    tmp_local_8.Add(tmp_local_11);
                }
                tmp_local_5.Add(tmp_local_8);
            }
            ssints.Add(tmp_local_5);
        }
        if (clientmap == null)
            clientmap = new Dictionary<client,string>();
        else
            clientmap.Clear();
        int tmp_local_12 = BinaryHandle.Read7BitEncodedInt(binary);
        for (int tmp_local_13 = 0; tmp_local_13 < tmp_local_12; ++tmp_local_13)
        {
            client tmp_local_14 = new client();
            tmp_local_14.ReadByBinary(binary);
            string tmp_local_15;
            tmp_local_15 = BinaryHandle.ReadString(binary);
            clientmap.Add(tmp_local_14,tmp_local_15);
        }
        unit1 = BinaryHandle.ReadUInt(binary);
        char1 = BinaryHandle.ReadByte(binary);
        uchar1 = BinaryHandle.ReadUByte(binary);
        short1 = BinaryHandle.ReadShort(binary);
        ushort1 = BinaryHandle.ReadUShort(binary);
    }
}
